Method for clearing handler cache. - #187
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
@slnode ok to test |
|
Test FAILed. To trigger a build add comment - ".test\W+please" |
|
Hi @bajtos, apparently the jenkins build failed. But the Travis build is passing. Anything I can do to help fix it? |
|
Could you please rebase your changes on top of the current master? It looks like your patch is based on loopback@1.6.1. Hint: $ git fetch upstream # upstream = strongloop/loopback
$ git rebase upstream/master
$ git push -f |
|
I believe it is already based on current master. |
|
|
Then it's a bug of our Jenkins setup :( @rmg could you please investigate? Looks like this is the same issue we were discussing over the e-mail recently. Is there a way how to reset the Jenkins state to get this pull request built correctly? |
|
Back to the patch itself. First of all, thank you @gcirne for submitting it! AFAIK If I recall correctly, we were discussing this problem with @ritch and/or @raymondfeng and the plan was to add an event when a new model is registered. The handler cache can listen on this event and invalidate REST handler when a new model is added. @gcirne Could you please describe your use case? How does it happen that you are adding/modifying models after the first REST request was handled? |
|
Sure. We basically want to add a new model dynamically by POSTing a JSON We have a JsonSchema model with an afterSave hook registered. When we POST The event solution you describe sounds good to me and fits perfectly with Guilherme Machado Cirne On Mon, Feb 17, 2014 at 4:12 PM, Miroslav Bajtoš
|
|
test please |
|
Sorry, @gcirne, Jenkins seems to be quite confused at the moment. Easiest way to trigger a rebuild and have it actually build the right thing is to push another commit. :-( |
|
Test FAILed. To trigger a build add comment - ".test\W+please" |
|
Hmm, failed again (but Travis is fine). :( |
|
Test FAILed. To trigger a build add comment - ".test\W+please" |
|
Jenkins is still building the wrong thing.. :-/ Whoever commits the merge will just have to make sure they test locally when they do it, I guess. |
That would be awesome! |
|
@bajtos ok, I'll try to get it done today. |
|
Sorry, but as @bajtos said this is exposing internals shouldn't be exposed. We might drastically refactor these in 2.0. However clearing the handlers on an |
|
Hey @ritch, I'm not really sure I agree that the current implementation is exposing internals. The I was thinking of making |
This is needed when adding a model dynamically after the rest handler has been cached. In this situation, the model would not be reflected in the handler and would return 404.